package cn.cs.mathgo.common.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Map;

/**
 * @author wu
 * @date 2018/08/24
 * @Description:
 */
@ApiModel(value = "通用分页查询Vo")
@Data
public class BaseQueryVo<T> {
    @ApiModelProperty(value = "实体查询条件,传对应实体的json")
    @Deprecated
    private T t;
    @ApiModelProperty(value = "页码")
    @Deprecated
    private Integer page;
    @ApiModelProperty(value = "每页数量")
    @Deprecated
    private Integer pageSize;
    @Deprecated
    @ApiModelProperty(value = "排序条件，如按id正序查询：'id+'")
    private String orderBy;
    @ApiModelProperty(value = "分页对象,currentPage,size,totalPage,totalElements")
    private PageQueryVO pageObj;
    @ApiModelProperty(value = "大于等于查询条件,传对应map,key为字段名,value为字段值")
    private Map<String, Object> gtCondition;
    @ApiModelProperty(value = "小于等于查询条件,传对应map,key为字段名,value为字段值")
    private Map<String, Object> ltCondition;
    @ApiModelProperty(value = "and查询条件,传对应map,key为字段名,value为字段值")
    private Map<String, Object> andCondition;
    @ApiModelProperty(value = "like等于查询条件,传对应map,key为字段名,value为字段值")
    private Map<String, Object> likeCondition;
    @ApiModelProperty(value = "排序查询条件,传对应map,key为字段名,value为字段值(asc,desc)")
    private Map<String, Object> orderByCondition;

    /**
     * @author wu
     * @date 2018/09/19
     * @Description:
     */
    @Data
    public class PageQueryVO {

        private Integer currentPage=1;

        private Integer size=Integer.MAX_VALUE;
    }

}